home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form Form1
- Caption = "Form1"
- ClientHeight = 1590
- ClientLeft = 3660
- ClientTop = 1485
- ClientWidth = 2055
- Height = 1995
- Left = 3600
- LinkMode = 1 'Source
- LinkTopic = "Form1"
- ScaleHeight = 1590
- ScaleWidth = 2055
- Top = 1140
- Width = 2175
- Begin CommandButton Command1
- Caption = "Abort Print Job"
- Height = 495
- Left = 120
- TabIndex = 0
- Top = 960
- Width = 1815
- End
- Begin CommandButton Command2
- Caption = "Start Print Job"
- Height = 495
- Left = 120
- TabIndex = 1
- Top = 240
- Width = 1815
- End
- Sub Command1_Click ()
- On Error GoTo NoPrintMan 'Handles case where PrintMan not running
- AppActivate "Print Manager" 'Makes PrintMan the active app
- SendKeys "%{ }{Down 5}%{F4}{Enter}", 1 'Sends keys to close PrintMan, assuming PrintMan is minimized
- GoTo EndIt
- NoPrintMan:
- MsgBox "The Print Manager is not running, or no printing is in progress!"
- Resume EndIt
- EndIt:
- End Sub
- Sub Command2_Click ()
- For x = 1 To 60
- Printer.Print "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890"
- Next x
- Printer.NewPage
- Printer.EndDoc
- End Sub
-